package com.easyJavaDemo.entity.po;

import java.time.LocalDateTime;
import com.easyJavaDemo.utils.LocalDateTimeUtils;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;

/**
 * 商品表
 */
public class Goods implements Serializable{
	/**
	 * 主键id
	 */
	private Integer id;

	/**
	 * 商品名称
	 */
	private String name;

	/**
	 * 商品价格
	 */
	private Integer price;

	/**
	 * 商品描述
	 */
	private String description;

	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
	private LocalDateTime createTime;

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
	private LocalDateTime updateTime;

	public void setId(Integer id){
		this.id = id;
	}

	public Integer getId(){
		return this.id;
	}

	public void setName(String name){
		this.name = name;
	}

	public String getName(){
		return this.name;
	}

	public void setPrice(Integer price){
		this.price = price;
	}

	public Integer getPrice(){
		return this.price;
	}

	public void setDescription(String description){
		this.description = description;
	}

	public String getDescription(){
		return this.description;
	}

	public void setCreateTime(LocalDateTime createTime){
		this.createTime = createTime;
	}

	public LocalDateTime getCreateTime(){
		return this.createTime;
	}

	public void setUpdateTime(LocalDateTime updateTime){
		this.updateTime = updateTime;
	}

	public LocalDateTime getUpdateTime(){
		return this.updateTime;
	}

	@Override
	public String toString(){
		return "主键id:"  + (id == null ? "空" : id) + "\n" + "商品名称:"  + (name == null ? "空" : name) + "\n" + "商品价格:"  + (price == null ? "空" : price) + "\n" + "商品描述:"  + (description == null ? "空" : description) + "\n" + "创建时间:"  + (createTime == null ? "空" : LocalDateTimeUtils.format(LocalDateTimeUtils.YYYY_MM_DD_HH_MM_SS, createTime)) + "\n";
	}
}
